import {downloadByBlob, downloadWithBuffer, post} from "@/utils/request";
import {IDownloadParams} from "@/types/generator";

// 生成代码（zip压缩包）
export const useDownloadApi = (params: IDownloadParams) => {
	return downloadByBlob('/generator/v1/generator/download', params)
}

// 生成代码（自定义目录）
export const useGeneratorApi = (tableIds: any[]) => {
	return post('/generator/v1/generator/code', tableIds)
}
